<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:c="http://java.sun.com/jsp/jstl/core"
	  xmlns:h="http://java.sun.com/jsf/html">
	<head><title>IGNORED</title></head>
	<body>
		<ui:composition>
			<div id="navigation" class="graphic_bg">
				<c:choose>
					<c:when test="#{authenticationBean.authentication.authorized}">
						<div id="nav_left">
							<ul class="menu">
								<li><h:link outcome="deals"><h:graphicImage library="images/icons/32" name="tag_blue.png" alt="d" title="Deals" styleClass="menu-icon" />Deals</h:link></li>
							</ul>
						</div>
						<h:form>
							<span style="line-height: 44px; display: inline-block; vertical-align: top;">Hello, <h:outputText value="#{authenticationBean.userProfile.displayName}" style="font-weight: bold; font-style: italic;" />!</span>
							<ul class="menu">
								<li><h:link outcome="profile"><h:graphicImage library="images/icons/32" name="user.png" alt="c" title="Customer" styleClass="menu-icon" />Customer</h:link>
									<ul>
										<li><h:link styleClass="menuitem" outcome="profile"><h:graphicImage library="images/icons/32" name="report_user.png" alt="a" title="Account" styleClass="menu-icon" />Account</h:link></li>
										<li><h:link styleClass="menuitem" outcome="orders"><h:graphicImage library="images/icons/32" name="package.png" alt="o" title="Orders" styleClass="menu-icon" />Orders</h:link></li>
										<li><h:link styleClass="menuitem" outcome="cart"><h:graphicImage library="images/icons/32" name="cart.png" alt="c" title="Cart" styleClass="menu-icon" />Cart</h:link></li>
									</ul>
								</li>
								<c:if test="#{authenticationBean.userProfile.partner}">
									<li><h:link outcome="company-page"><h:graphicImage library="images/icons/32" name="user_suit.png" alt="p" title="Partner" styleClass="menu-icon" />Partner</h:link>
										<ul>
											<li><h:link styleClass="menuitem" outcome="company-page"><h:graphicImage library="images/icons/32" name="reseller_account_template.png" alt="cp" title="Company Profile" styleClass="menu-icon" />Company Profile</h:link></li>
											<li><h:link styleClass="menuitem" outcome="partner-deals"><h:graphicImage library="images/icons/32" name="reseller_account.png" alt="md" title="Manage Deals" styleClass="menu-icon" />Manage Deals</h:link></li>
										</ul>
									</li>
								</c:if>
								<c:if test="#{authenticationBean.userProfile.admin}" >
									<li><h:link outcome="profile"><h:graphicImage library="images/icons/32" name="user_policeman.png" alt="a" title="Administrator" styleClass="menu-icon" />Administrator</h:link>
										<ul>
											<li><h:link styleClass="menuitem" outcome="manage_clients"><h:graphicImage library="images/icons/32" name="group_edit.png" alt="mc" title="Manage Clients" styleClass="menu-icon" />Manage Clients</h:link></li>
											<li><h:link styleClass="menuitem" outcome="manage_deals"><h:graphicImage library="images/icons/32" name="reseller_account.png" alt="md" title="Manage Deals" styleClass="menu-icon" />Manage Deals</h:link></li>
											<li><h:link styleClass="menuitem" outcome="manage_categories"><h:graphicImage library="images/icons/32" name="folder_edit.png" alt="mc" title="Manage Categories" styleClass="menu-icon" />Manage Categories</h:link></li>
										</ul>
									</li>
								</c:if>
								<li>
									<h:commandLink action="#{authenticationBean.doLogout}">
										<h:graphicImage library="images/icons/32" name="door_in.png" alt="l" title="Log Out" styleClass="menu-icon" />Log Out
									</h:commandLink>
								</li>
							</ul>
						</h:form>
					</c:when>
					<c:otherwise>
						<div id="nav_left">
							<ul class="menu">
								<li><h:link outcome="deals"><h:graphicImage library="images/icons/32" name="tag_blue.png" alt="d" title="Deals" styleClass="menu-icon" />Deals</h:link></li>
							</ul>
						</div>
						<h:form>
							<ul class="menu">
								<li><h:link outcome="login"><h:graphicImage library="images/icons/32" name="lock.png" alt="l" title="Login" styleClass="menu-icon" />Login</h:link></li>
								<li><h:commandLink action="#{authenticationBean.doSignupCustomer}"><h:graphicImage library="images/icons/32" name="user.png" alt="cs" title="Customer Sign Up" styleClass="menu-icon" />Customer Sign Up</h:commandLink></li>
								<li><h:commandLink action="#{authenticationBean.doSignupCompany}"><h:graphicImage library="images/icons/32" name="user_suit.png" alt="ps" title="Partner Sign Up" styleClass="menu-icon" />Partner Sign Up</h:commandLink></li>
							</ul>
						</h:form>
					</c:otherwise>
				</c:choose>
			</div>
		</ui:composition>
	</body>
</html>
